using System;
using UnityEngine;

namespace EntityKit.Runtime
{
    [Serializable]
    public class SerializableRect
    {
        public float x, y, width, height;

        public SerializableRect(Rect r)
        {
            x = r.x;
            y = r.y;
            width = r.width;
            height = r.height;
        }

        public Rect ToRect() => new Rect(x, y, width, height);
    }
}